package com.xoa.controller.party;

import com.xoa.model.party.ThreeForm;
import com.xoa.service.party.ThreeFormService;
import com.xoa.util.ToJson;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * Created by gsb on 2017/11/25.
 */
@Controller
@RequestMapping("/threeForm")
public class ThreeFormController {

    @Resource
    private ThreeFormService threeFormService;

    @RequestMapping("/insert")
    @ResponseBody
    public ToJson<ThreeForm> insert(String beginTime , String buildTime, String tbr, String lxdh, String tbsj , ThreeForm threeForm, HttpServletRequest request){
        return threeFormService.insert(beginTime,buildTime,tbr,lxdh,tbsj,threeForm);
    }
    @RequestMapping("/update")
    @ResponseBody
    public ToJson<ThreeForm> update(String beginTime, String buildTime, String tbr, String lxdh, String tbsj, ThreeForm threeForm, HttpServletRequest request){
        return threeFormService.update(beginTime,buildTime,tbr, lxdh, tbsj, threeForm);
    }
    @RequestMapping("/deleteByPrimaryKey")
    @ResponseBody
    public ToJson<ThreeForm> deleteByPrimaryKey(Integer lid, HttpServletRequest request){
        return threeFormService.deleteByPrimaryKey(lid);
    }
    @RequestMapping("/selectByPrimaryKey")
    @ResponseBody
    public ToJson<ThreeForm> selectByPrimaryKey(Integer lid){
        return threeFormService.selectByPrimaryKey(lid);
    }
    @RequestMapping("/query")
    @ResponseBody
    public ToJson<ThreeForm> query(Map<String,Object> maps, Integer page,
                                   Integer pageSize, boolean useFlag, HttpServletRequest request){
        return threeFormService.query(maps, page, pageSize, useFlag);
    }

}
